from django.db import models

# Create your models here.
from meiduo_mall.utils.models import BasicModel



class OauthQQUser(BasicModel):

    openid = models.CharField(max_length=64,verbose_name='QQopenid唯一标识',db_index=True)  # 只能加速查找
    user = models.ForeignKey('users.User',on_delete=models.CASCADE,verbose_name='用户id')

    class Meta:
        db_table = 'tb_oauth_qq'
        verbose_name = 'QQ登录用户数据'
        verbose_name_plural = verbose_name # 复数形式的 中文无复数形式

class OAuthSinaUser(BasicModel):
    """
    Sina登录用户数据
    """
    user = models.ForeignKey('users.User', on_delete=models.CASCADE, verbose_name='用户')
    access_token = models.CharField(max_length=64, verbose_name='access_token', db_index=True)

    class Meta:
        db_table = 'tb_oauth_sina'
        verbose_name = 'sina登录用户数据'
        verbose_name_plural = verbose_name